<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%>
<!DOCTYPE html>
<html>
<head>
<title>反馈记录</title>
<%@ include file="/WEB-INF/views/manager/include.inc.jsp"%>
</head>
<body>
<!--top s-->
<c:import url="/public/header?tag=Config" />
<!--top end-->
<div class="m_main">
  <!--left s-->
  <c:import url="/public/left?tag=Config&tag1=Suggest" />
  <!--left end-->
  <!--right s-->
  <div class="m_right fl">
	<div class="inquiry">
	  <feing:paginationForm action="${contextPath }/manager/suggest/list" page="${page }">
	  </feing:paginationForm>
	</div>
	<div class="r_box">
	  <div class="title1"><h3>反馈记录</h3></div>
	  <div class="list_tab">
		<table>
		  <thead>
			<tr>
			  <th class="nub"></th>
			  <th>名称</th>
			  <th>邮箱</th>
			  <th style="width:40%">内容</th>
			  <th style="width:20%">反馈时间</th>
			  <th></th>
			</tr>
		  </thead>
		  <tbody>
			<c:forEach var="suggest" items="${suggestList }" varStatus="status">
			  <c:choose><c:when test="${status.index % 2 == 0 }"><tr></c:when><c:otherwise><tr class="odd"></c:otherwise></c:choose>
				<td class="nub">${status.index + 1 }</td>
				<td class="ell">${suggest.name }</td>
				<td class="ell">${suggest.email }</td>
				<td class="ell">${suggest.content }</td>
				<td><fmt:formatDate value="${suggest.createTime }" pattern="yyyy-MM-dd HH:mm" /></td>
				<td>
				  <shiro:hasPermission name="Suggest:view">
				    <a href="${contextPath }/manager/suggest/view/${suggest.id}">详情</a>&nbsp;
				  </shiro:hasPermission>
				  <shiro:hasPermission name="Suggest:delete">
				    <a href="javascript:deleteSuggest(${suggest.id })">删除</a>
				  </shiro:hasPermission>
				</td>
			  </tr>
			</c:forEach>
		  </tbody>
		</table>
		<div class="pagebox">
		  <!--翻页-->
		  <feing:pagination page="${page }" choosePages="true" />
		  <!--翻页-->
		</div>
	  </div>
	</div>
  </div>
  <!--right end-->
</div>
<div class="foot"></div>
<script>
function deleteSuggest(id) {
	if (confirm("确定要删除吗？")) {
		$.post2("${contextPath}/manager/suggest/delete/" + id, {}, callbackRef, "json");
	}
}
function close2refresh() {
	var param = "?pageNum=" + $("#p_pageNum").val();
	goToPage(path + "/manager/suggest/list" + param);
}
</script>
</body>
</html>